<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        // var arr = [1, "2", true, , , {}, [], function () { console.log(123) }]

        // arr[20] = 666
        // console.log(arr)
        // console.log(arr.length)

        // console.log(arr[100] = 100)
        // console.log(arr.length)

        // for (var i = 1; i <= 100; i++) {
        //     arr[arr.length] = i
        // }
        // console.log(arr)
        // arr[arr.length] = 1
        // arr[arr.length] = 2
        // arr[arr.length] = 3
        // arr[arr.length] = 4
        // arr[arr.length] = 5
        // console.log(arr)

        // var arr1 = [1, "2", true, , , {}, [], function () { console.log(123) }, 1, 2, 3, 4, 5]

        // for (var i = 0; i < arr.length; i++) {
        //     console.log(arr[i])
        // }

        // arr.length = 0
        // console.log(arr)

        // console.log(arr[7]())
        // console.log(arr[arr.length - 1]())

        // arr[0] = 5
        // console.log(arr)

        // var a = "123"

        // // 获取
        // 数字的名[下表]

        // 数字的名[下表] =  值

        // 包装类
        // a[0] = 5


        // new String("123")[0] = 5


        // console.log(a)

        // console.log(arr)

        // console.log(arr[3])
        // console.log([])

        // var arr = [1]  //数组字面量

        // var arr1 = new Array(5)

        // console.log(arr)
        // console.log(arr1)

        var arr = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

        arr[0][arr[0].length] = 4

        console.log(arr)
    </script>
</body>

</html>